home *** CD-ROM | disk | FTP | other *** search
- Path: mail2news.demon.co.uk!wildcard.demon.co.uk
- From: Cyber Surfer <cyber_surfer@wildcard.demon.co.uk>
- Newsgroups: comp.lang.lisp,comp.lang.c++
- Subject: Re: Why garbage collection?
- Date: Sat, 03 Feb 96 16:11:27 GMT
- Organization: The Wildcard Killer Butterfly Breeding Ground
- Message-ID: <823363887snz@wildcard.demon.co.uk>
- References: <hbaker-2201961503250001@10.0.2.15> <4eae5s$66p@nz12.rz.uni-karlsruhe.de> <822675271snz@wildcard.demon.co.uk> <DM09G0.MzG.0.macbeth@cogsci.ed.ac.uk>
- Reply-To: cyber_surfer@wildcard.demon.co.uk
- X-NNTP-Posting-Host: wildcard.demon.co.uk
- X-Newsreader: Demon Internet Simple News v1.30
- X-Mail2News-Path: wildcard.demon.co.uk
-
- In article <DM09G0.MzG.0.macbeth@cogsci.ed.ac.uk>
- jeff@cogsci.ed.ac.uk "Jeff Dalton" writes:
-
- > >> Just look at the technical strength of the argument that GC is not
- > >> "in the tradition of the C community"...
- > >
- > >Yeah, I love it. ;-)
- >
- > But it _is_ true that GC is not in the tradition of the C community.
- > The argument that it's a "hidden cost" is key here. C programmers
- > feel that they know what everything will do in machine terms, and
- > to a fair extent they are right. (That's so despite a number of
- > difficulties and exceptions.)
-
- That may be less true these days, with the widespread use of C++, for
- the development of Windows software. There's a lot of "hidden cost" in
- C++ frameworks. I don't think of these as exceptions, because of the
- high popularity of these development tools. It's probably the programmers
- who use C, but not large libraries, who are the exceptions.
-
- Also, the future, at least for business software, looks more like
- being document oriented, rather than application oriented. This will
- introduce even more hidden costs.
-
- > So when a allocation might do lots of collecting as well (or
- > whatever), and you don't really know when, that seems to move
- > C into the higher-level / less-in-touch-with-the-machine camp.
-
- Exactly. The kind of APIs coming out of MS, Apple, and IBM these days
- look more and more high level to me. C is looking less attractive than
- C++, but the C++ frameworks that make complex APIs easier to handle
- can hide even more - which is both a feature _and_ a problem.
-
- > >Mind you, I'm very happy with a mark/compact GC, and I found one
- > >in a computer science book, Fundamentals of Data Structures, by
- > >E Horowitz and S Sahni. While they're not anti-GC, they refer to
- > >Knuth and his belief that specialist languages such as Lisp and
- > >SNOBOL are not necessary, and that list and string processing can
- > >be done in any language. The languages that seem to have interested
- > >them tend to be PL/I, Pascal, and Fortran. Not at all like Lisp.
- >
- > Well, surely it's true that list and string processing can be done
- > in (almost) any language. I've done list processing in Basic, for
- > instance. (Good Basics can, of course, do strings, so that's not
- > interesting.)
-
- I've done it in Forth. In fact, implementing Forth was the first time
- I use used linked lists. Since then, I've looked for better ways (i.e.
- better languages) for handling lists. The same applies to strings,
- as I wrote my first string package in Forth. Hmmm. That was also my
- first compiler...
-
- > But there's a difference between a language is not necessary
- > and saying it's not valuable, or not worth having and using.
- > I'm not sure when Knuth stated this belief, but such points had
- > a different role in the past then they tend to do today,
- > because it was not so widely known that, or how, you could
- > do list or string processing.
-
- Agreed. The book I quoted from was already dated when I first read it,
- in the early 80s. The Knuth quote could, for all I know, be _much_ older.
-
- > A similar thing today (or maybe a few years back) might be to
- > point out that you could do object-oriented programming in
- > (almost) any language.
-
- You can even do it in C++. ;-) I've not done any OOP in Forth, but
- there's at least one book on the subject. However, I've not read it.
- Perhaps you can also do functional programming in C/C++, but I've
- not tried it. I _have_ written an experimental Lisp to C compiler,
- which I should re-write someday. Anyone who has read a good Lisp
- tutorial (W&H, SICP, etc) should be able to write a similar compiler.
- --
- <URL:http://www.demon.co.uk/community/index.html>
- <URL:http://www.enrapture.com/cybes/namaste.html>
- Po-Yeh-Pao-Lo-Mi | "You can never browse enough."
-